package com.gugee.notice.core.controller;


import com.gugee.notice.core.dto.NoticeRequest;
import com.gugee.notice.core.service.NoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(value = "警报",tags = {"警报"})
public class NoticeController {

    @Autowired
    NoticeService noticeService;

    @ApiOperation(value = "发送警报")
    @RequestMapping(value = "notice",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public String sendNotice(NoticeRequest noticeRequest){
        return noticeService.sendNotice(noticeRequest);
    }
}
